import { defineConfig } from 'vite';
import path from 'path'
import react from '@vitejs/plugin-react';

export default defineConfig({
  base: '/',
  publicDir: path.resolve(__dirname, 'public'),
  plugins: [react()],
  server: {
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:12001',
        changeOrigin: true,
        rewrite: (path: string) => path.replace(/^\/api/, ''),
      }
    }
  }
});
